﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.ComponentModel;

namespace Karasoft.Web.UI
{
    [ToolboxData("<{0}:Calandar runat=server></{0}:Calandar>")]
    public class Calandar : System.Web.UI.WebControls.Calendar
    {
        protected override void OnInit(EventArgs e)
        {
            Page.Culture = CalandarCulture;
                base.OnInit(e);
        }
        

        [Bindable(true)]
        [Category("Appearance")]
        [DefaultValue("ar-SA")]
        public string CalandarCulture
        {
            get
            {
                String s = (String)ViewState["CalandarCulture"];
                return ((s == null) ? "ar-SA" : s);
            }

            set
            {
                ViewState["CalandarCulture"] = value;
            }
        }
    }
}
